﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    /// <summary>
    /// 函数重载示例
    /// 重载：允许函数重名
    /// 要素1：参数列表个数不同
    /// 要素2：参数列表相同，参数类型不同
    /// 
    /// 作用：通过一个函数，实现多个功能
    /// </summary>
    public class Overload
    {

        public Overload() { }

        public Overload(string name) { }

        public Overload(string name, int age) { }

        public Overload(int age,string name) { }



        public string Name;

        /// <summary>
        /// 无参函数
        /// </summary>
        public void Say()
        {

        }

        /// <summary>
        /// 参数列表个数不同
        /// </summary>
        public void Say(int age)
        {
        }

        /// <summary>
        /// 参数列表类型不同
        /// </summary>
        /// <param name="age"></param>
        public void Say(string age)
        {
        }

        /// <summary>
        /// 参数列表个数不同
        /// </summary>
        /// <param name="age"></param>
        /// <param name="name"></param>
        public void Say(string age,string name)
        {
        }

        /// <summary>
        /// 参数列表个数不同,类型不同
        /// </summary>
        /// <param name="age"></param>
        /// <param name="name"></param>
        public void Say(string age, int name)
        {
        }

        /// <summary>
        /// 参数列表个数不同,类型不同
        /// </summary>
        /// <param name="age"></param>
        /// <param name="name"></param>
        public void Say(int name,string age)
        {
        }
    }
}
